package com.iotechn.unimall.admin.api;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.CouponDO;
import com.iotechn.unimall.data.domain.RechargeableDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * 
 *
 * @author chen
 * @email 
 * @date 2020-05-27 10:43:33
 */
@HttpOpenApi(group = "admin.rechargeable", description = "微信充值")
public interface RechargeableService{

    @HttpMethod(description = "列表", permission = "promotion:rechargeable:page", permissionParentName = "推广管理", permissionName = "微信充值管理")
    public Page<RechargeableDO> page(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "promotion:rechargeable:create", permissionParentName = "推广管理", permissionName = "微信充值管理")
    public RechargeableDO create(
            @NotNull @HttpParam(name = "rechargeableDO", type = HttpParamType.COMMON, description = "") RechargeableDO rechargeableDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "promotion:rechargeable:update", permissionParentName = "推广管理", permissionName = "微信充值管理")
    public String update(
            @NotNull @HttpParam(name = "rechargeableDO", type = HttpParamType.COMMON, description = "") RechargeableDO rechargeableDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "promotion:rechargeable:delete",permissionParentName = "推广管理", permissionName = "微信充值管理")
    public String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "promotion:rechargeable:detail", permissionParentName = "推广管理", permissionName = "微信充值管理")
    public RechargeableDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "获取微信奖励优惠券")
    public List<CouponDO> getRewardCoupon(@NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
}

